﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TriplesProblems
{
    public static class TripleExtensions
    {
        public static string AsString(this IEnumerable<Triple> iEnum)
        {
            if (iEnum == null)
            {
                throw new NullReferenceException();
            }
            StringBuilder asString = new StringBuilder();
            asString.Append("{");
            foreach (var member in iEnum)
            {
                asString.Append(member);
                asString.Append(";");
            }
            asString.Remove(asString.Length - 1, 1);
            asString.Append("}");
            return asString.ToString();
        }
    }
}
